package com.sh.doctors.cloud

import android.os.Bundle
import android.os.Handler
import com.gyf.barlibrary.ImmersionBar

import com.helper.extens.navigateTo
import com.sh.doctors.cloud.databinding.ActivityLauncherBinding
import com.sh.doctors.cloud.patient.viewmodel.LauncherModel
import com.sh.doctors.cloud.patient.view.AriticleListActivity
import com.base.view.BaseActivity
import org.koin.android.viewmodel.ext.android.viewModel

class LauncherActivity : BaseActivity<ActivityLauncherBinding>() {
    private val mViewModel by viewModel<LauncherModel>()
    override fun getLayoutId(): Int = R.layout.activity_launcher

    override fun initView() {
        mBinding.launcherVM = mViewModel
        delayJump()
    }

    private fun delayJump() {
        Handler().postDelayed(Runnable {
            navigateTo(AriticleListActivity::class.java)
            finish()
        }, 2000)
    }

    override fun loadData(isRefresh: Boolean) {

    }

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        ImmersionBar.with(this).statusBarColor(R.color.transparence).init()
    }

}
